package com.ricky.model.example;

import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

/**
 * 灏佽and鏉′欢
 *
 * @author
 * @date
 */
public abstract class GeneratedCriteria {
    protected List<Criterion> criteria;

    protected GeneratedCriteria() {
        criteria = new ArrayList<Criterion>();
    }

    public boolean isValid() {
        return criteria.size() > 0;
    }

    public List<Criterion> getAllCriteria() {
        return criteria;
    }

    public List<Criterion> getCriteria() {
        return criteria;
    }

    protected void addCriterion(String condition) {
        if (condition == null) {
            throw new RuntimeException("Value for condition cannot be null");
        }
        criteria.add(new Criterion(condition));
    }

    protected void addCriterion(String condition, Object value, String property) {
        if (value == null) {
            throw new RuntimeException("Value for " + property + " cannot be null");
        }
        criteria.add(new Criterion(condition, value));
    }

    protected void addCriterion(String condition, Object value1, Object value2, String property) {
        if (value1 == null || value2 == null) {
            throw new RuntimeException("Between values for " + property + " cannot be null");
        }
        criteria.add(new Criterion(condition, value1, value2));
    }

    protected void addCriterionForJDBCDate(String condition, Date value, String property) {
        if (value == null) {
            throw new RuntimeException("Value for " + property + " cannot be null");
        }
        addCriterion(condition, new java.sql.Date(value.getTime()), property);
    }

    protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
        if (values == null || values.size() == 0) {
            throw new RuntimeException("Value list for " + property + " cannot be null or empty");
        }
        List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
        Iterator<Date> iter = values.iterator();
        while (iter.hasNext()) {
            dateList.add(new java.sql.Date(iter.next().getTime()));
        }
        addCriterion(condition, dateList, property);
    }

    protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
        if (value1 == null || value2 == null) {
            throw new RuntimeException("Between values for " + property + " cannot be null");
        }
        addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
    }

    public GeneratedCriteria andIdIsNull() {
        addCriterion("id is null");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andIdIsNotNull() {
        addCriterion("id is not null");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andIdEqualTo(String value) {
        addCriterion("id =", value, "id");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andIdNotEqualTo(String value) {
        addCriterion("id <>", value, "id");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andIdGreaterThan(String value) {
        addCriterion("id >", value, "id");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andIdGreaterThanOrEqualTo(String value) {
        addCriterion("id >=", value, "id");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andIdLessThan(String value) {
        addCriterion("id <", value, "id");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andIdLessThanOrEqualTo(String value) {
        addCriterion("id <=", value, "id");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andIdIn(List<String> values) {
        addCriterion("id in", values, "id");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andIdNotIn(List<String> values) {
        addCriterion("id not in", values, "id");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andIdBetween(String value1, String value2) {
        addCriterion("id between", value1, value2, "id");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andIdNotBetween(String value1, String value2) {
        addCriterion("id not between", value1, value2, "id");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andCreateOnIsNull() {
        addCriterion("create_on is null");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andCreateOnIsNotNull() {
        addCriterion("create_on is not null");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andCreateOnEqualTo(Date value) {
        addCriterion("create_on =", value, "createOn");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andCreateOnNotEqualTo(Date value) {
        addCriterion("create_on <>", value, "createOn");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andCreateOnGreaterThan(Date value) {
        addCriterion("create_on >", value, "createOn");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andCreateOnGreaterThanOrEqualTo(Date value) {
        addCriterion("create_on >=", value, "createOn");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andCreateOnLessThan(Date value) {
        addCriterion("create_on <", value, "createOn");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andCreateOnLessThanOrEqualTo(Date value) {
        addCriterion("create_on <=", value, "createOn");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andCreateOnIn(List<Date> values) {
        addCriterion("create_on in", values, "createOn");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andCreateOnNotIn(List<Date> values) {
        addCriterion("create_on not in", values, "createOn");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andCreateOnBetween(Date value1, Date value2) {
        addCriterion("create_on between", value1, value2, "createOn");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andCreateOnNotBetween(Date value1, Date value2) {
        addCriterion("create_on not between", value1, value2, "createOn");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andCreateByIsNull() {
        addCriterion("create_by is null");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andCreateByIsNotNull() {
        addCriterion("create_by is not null");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andCreateByEqualTo(Long value) {
        addCriterion("create_by =", value, "createBy");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andCreateByNotEqualTo(Long value) {
        addCriterion("create_by <>", value, "createBy");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andCreateByGreaterThan(Long value) {
        addCriterion("create_by >", value, "createBy");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andCreateByGreaterThanOrEqualTo(Long value) {
        addCriterion("create_by >=", value, "createBy");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andCreateByLessThan(Long value) {
        addCriterion("create_by <", value, "createBy");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andCreateByLessThanOrEqualTo(Long value) {
        addCriterion("create_by <=", value, "createBy");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andCreateByIn(List<Long> values) {
        addCriterion("create_by in", values, "createBy");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andCreateByNotIn(List<Long> values) {
        addCriterion("create_by not in", values, "createBy");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andCreateByBetween(Long value1, Long value2) {
        addCriterion("create_by between", value1, value2, "createBy");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andCreateByNotBetween(Long value1, Long value2) {
        addCriterion("create_by not between", value1, value2, "createBy");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andUpdateOnIsNull() {
        addCriterion("update_on is null");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andUpdateOnIsNotNull() {
        addCriterion("update_on is not null");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andUpdateOnEqualTo(Date value) {
        addCriterion("update_on =", value, "updateOn");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andUpdateOnNotEqualTo(Date value) {
        addCriterion("update_on <>", value, "updateOn");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andUpdateOnGreaterThan(Date value) {
        addCriterion("update_on >", value, "updateOn");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andUpdateOnGreaterThanOrEqualTo(Date value) {
        addCriterion("update_on >=", value, "updateOn");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andUpdateOnLessThan(Date value) {
        addCriterion("update_on <", value, "updateOn");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andUpdateOnLessThanOrEqualTo(Date value) {
        addCriterion("update_on <=", value, "updateOn");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andUpdateOnIn(List<Date> values) {
        addCriterion("update_on in", values, "updateOn");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andUpdateOnNotIn(List<Date> values) {
        addCriterion("update_on not in", values, "updateOn");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andUpdateOnBetween(Date value1, Date value2) {
        addCriterion("update_on between", value1, value2, "updateOn");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andUpdateOnNotBetween(Date value1, Date value2) {
        addCriterion("update_on not between", value1, value2, "updateOn");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andUpdateByIsNull() {
        addCriterion("update_by is null");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andUpdateByIsNotNull() {
        addCriterion("update_by is not null");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andUpdateByEqualTo(Long value) {
        addCriterion("update_by =", value, "updateBy");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andUpdateByNotEqualTo(Long value) {
        addCriterion("update_by <>", value, "updateBy");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andUpdateByGreaterThan(Long value) {
        addCriterion("update_by >", value, "updateBy");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andUpdateByGreaterThanOrEqualTo(Long value) {
        addCriterion("update_by >=", value, "updateBy");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andUpdateByLessThan(Long value) {
        addCriterion("update_by <", value, "updateBy");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andUpdateByLessThanOrEqualTo(Long value) {
        addCriterion("update_by <=", value, "updateBy");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andUpdateByIn(List<Long> values) {
        addCriterion("update_by in", values, "updateBy");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andUpdateByNotIn(List<Long> values) {
        addCriterion("update_by not in", values, "updateBy");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andUpdateByBetween(Long value1, Long value2) {
        addCriterion("update_by between", value1, value2, "updateBy");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andUpdateByNotBetween(Long value1, Long value2) {
        addCriterion("update_by not between", value1, value2, "updateBy");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andCreateTimeIsNull() {
        addCriterion("create_time is null");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andCreateTimeIsNotNull() {
        addCriterion("create_time is not null");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andCreateTimeEqualTo(Date value) {
        addCriterion("create_time =", value, "createTime");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andCreateTimeNotEqualTo(Date value) {
        addCriterion("create_time <>", value, "createTime");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andCreateTimeGreaterThan(Date value) {
        addCriterion("create_time >", value, "createTime");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andCreateTimeGreaterThanOrEqualTo(Date value) {
        addCriterion("create_time >=", value, "createTime");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andCreateTimeLessThan(Date value) {
        addCriterion("create_time <", value, "createTime");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andCreateTimeLessThanOrEqualTo(Date value) {
        addCriterion("create_time <=", value, "createTime");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andCreateTimeIn(List<Date> values) {
        addCriterion("create_time in", values, "createTime");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andCreateTimeNotIn(List<Date> values) {
        addCriterion("create_time not in", values, "createTime");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andCreateTimeBetween(Date value1, Date value2) {
        addCriterion("create_time between", value1, value2, "createTime");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andCreateTimeNotBetween(Date value1, Date value2) {
        addCriterion("create_time not between", value1, value2, "createTime");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andUpdateTimeIsNull() {
        addCriterion("update_time is null");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andUpdateTimeIsNotNull() {
        addCriterion("update_time is not null");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andUpdateTimeEqualTo(Date value) {
        addCriterion("update_time =", value, "updateTime");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andUpdateTimeNotEqualTo(Date value) {
        addCriterion("update_time <>", value, "updateTime");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andUpdateTimeGreaterThan(Date value) {
        addCriterion("update_time >", value, "updateTime");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
        addCriterion("update_time >=", value, "updateTime");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andUpdateTimeLessThan(Date value) {
        addCriterion("update_time <", value, "updateTime");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andUpdateTimeLessThanOrEqualTo(Date value) {
        addCriterion("update_time <=", value, "updateTime");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andUpdateTimeIn(List<Date> values) {
        addCriterion("update_time in", values, "updateTime");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andUpdateTimeNotIn(List<Date> values) {
        addCriterion("update_time not in", values, "updateTime");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andUpdateTimeBetween(Date value1, Date value2) {
        addCriterion("update_time between", value1, value2, "updateTime");
        return (GeneratedCriteria) this;
    }

    public GeneratedCriteria andUpdateTimeNotBetween(Date value1, Date value2) {
        addCriterion("update_time not between", value1, value2, "updateTime");
        return (GeneratedCriteria) this;
    }
}
